				</div>
			</td>
		</tr>
	</table>
</div><?php  App::Helper('JavaScript')->appForm('form');?>
<script type="text/javascript">
	var productid ='<?php echo $id; ?>' ;
	jQuery(document).ready(function () {
		jQuery(".toggle").click(function(event) {
			var eid = jQuery(this).attr('id');
			jQuery('.' + eid ).toggle();
		});
		
		jQuery(window).scroll(function() {
			if(jQuery(document).scrollTop() > 110){			
				jQuery('#menu').css('position','fixed');
				jQuery('#menu').css('top','0');
			}
			else{
				jQuery('#menu').css('position','inherit');
					
			}
		});
		
	});

	jQuery(document).ready(function () {
		jQuery(".delete_image").click(function(event) {
			
			if(confirm('Are you sure to delete?')){
				jQuery(this).attr('src',siteInfo.baseUrl + '/images/loading.gif');
				var e =this;														
				jQuery.ajax({
					url: siteInfo.baseUrl + '/managestore/deleteimage',
					context: document.body,
					type: "POST",
					data: {data:jQuery(e).attr('longdesc')}
				}).done(function(data) {
					jQuery(e).parent('.imagespan').addClass('displaynone')
				});
			}
		});
	});		
</script>
<script type="text/javascript">	
var seq = 0;	
jQuery(document).ready(function () {	
	jQuery('#addimage').click(function(event){
		var id = 'slide_' + (seq++) ;
		var img_pan_id = 'slide_img_pan_' + (seq) ;
		
		jQuery(".slide-image-pan")								
			.append('<input type="file" name="data[Product][imagelist][]" style="display:none" id="' + id + '" />');
			
		jQuery('#' + id).change(function(){
			jQuery('.slide-image-pan')
				.append('<div class="field" id="' + img_pan_id + '"><a href="javascript:void(0);" onclick="jQuery(\'#'+ img_pan_id +'\').toggle();jQuery(\'#' + id + '\').remove();">X</a>  <strong>' + jQuery(this).val() + '</strong></div> ')
		}).click();
	});	
	
	jQuery("#slidetype").change(function(event) {
		if( jQuery(this).val() == 'NewWindow'){
			jQuery('.large-image').removeClass('displaynone');
			jQuery('.slide-image-pan').addClass('displaynone');							
		}								
		else if(jQuery(this).val() == 'Zoom'){
			jQuery('.large-image').addClass('displaynone');
			jQuery('.slide-image-pan').removeClass('displaynone');
		}
		else{
			jQuery('.large-image').addClass('displaynone');
			jQuery('.slide-image-pan').addClass('displaynone');
		}
	});
});		
</script>
<script type="text/javascript">
	jQuery(document).ready(function () {
		jQuery("#attributegroup").change(function(event) {
			jQuery.ajax({
				url: siteInfo.baseUrl + '/managestore/getproductdata/' + jQuery(this).val() + '/' + productid,
				context: document.body
			}).done(function(data) {
				jQuery('#attribute_information_fields').html(data);
			});
		});
	});		
</script>
<script type="text/javascript">
	jQuery(document).ready(function () {
		jQuery("#type").change(function(event) {
			jQuery("#virtualproduct_box").toggle();
			jQuery("#shipableproduct_box").toggle();								
		});
	});		
</script>	
<script type="text/javascript">	
var seq2 = 0;	
jQuery(document).ready(function () {	
	jQuery('#galleryimage').click(function(event){
		var id = 'galimg_' + (seq++) ;
		var img_pan_id = 'gal_img_pan_' + (seq) ;
		
		jQuery(".gallery-image-pan")								
			.append('<input type="file" name="data[Product][gallerylist][]" style="display:none" id="' + id + '" />');
			
		jQuery('#' + id).change(function(){
			jQuery('.gallery-image-pan')
				.append('<div class="field" id="' + img_pan_id + '"><a href="javascript:void(0);" onclick="jQuery(\'#'+ img_pan_id +'\').toggle();jQuery(\'#' + id + '\').remove();">X</a>  <strong>' + jQuery(this).val() + '</strong></div> ')
		}).click();
	});
		

	
	jQuery("#slidetype").change(function(event) {
		if( jQuery(this).val() == 'NewWindow'){
			jQuery('.large-image').removeClass('displaynone');
			jQuery('.slide-image-pan').addClass('displaynone');							
		}								
		else if(jQuery(this).val() == 'Zoom'){
			jQuery('.large-image').addClass('displaynone');
			jQuery('.slide-image-pan').removeClass('displaynone');
		}
		else{
			jQuery('.large-image').addClass('displaynone');
			jQuery('.slide-image-pan').addClass('displaynone');
		}
	});
});		
</script>